-- GENERATED SPELL FOR [Wrekt Seer] --


function spell0_17143(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(11642,pUnit)
pUnit:RegisterEvent('Sorts_17143', 3500, 1)
end

function spell1_17143(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17143', 0, 1)
end

function spell2_17143(pUnit, Event) --@Wrekt Visage,n/a--
pUnit:FullCastSpellOnTarget(32931,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17143', 585, 1)
end

function Sorts_17143(pUnit, Event)
local choix_sorts_17143 = math.random(0, 2)
if choix_sorts_17143 == 0 then
pUnit:RegisterEvent('spell0_17143', 1, 1)
end
if choix_sorts_17143 == 1 then
pUnit:RegisterEvent('spell1_17143', 1, 1)
end
if choix_sorts_17143 == 2 then
pUnit:RegisterEvent('spell2_17143', 1, 1)
end
end

function mob17143_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17143', math.random(1500, 3000), 1)
end

function mob17143_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17143_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17143_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17143, 1, 'mob17143_Action')
RegisterUnitEvent(17143, 2, 'mob17143_Leave')
RegisterUnitEvent(17143, 3, 'mob17143_Kill')
RegisterUnitEvent(17143, 4, 'mob17143_Die')
